﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
using Sirenix.Utilities;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities.Editor;

namespace Miao.UI
{
    [CustomEditor(typeof(RoleDialog))]
    class RoleDialogEditor : OdinEditor
    {
        private RoleDialog component;
        public GUIContent anchorsContent = EditorGUIUtility.TrTextContent("Anchors");
        protected override void OnEnable()
        {
            base.OnEnable();
            component = (RoleDialog)target;
        }


        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            //EditorGUI.Foldout(anchorRect, m_ShowLayoutOptions, styles.anchorsContent, true);
            //k = EditorGUILayout.Foldout(k, anchorsContent);
            MiaoGUILayout.NineGridButton(new Action[] { component.SetTopLeft, component.SetTop,component.SetTopRight, component.SetLeft, ()=> { }, component.SetRight, component.SetBottomLeft,component.SetBottom,component.SetBottomRight });
            //Odin();
        }
        public void Odin()
        {
            var t = SirenixEditorGUI.BeginHorizontalPropertyLayout(anchorsContent);
            SirenixEditorGUI.DrawColorField(t, new Color(1, 1, 1));

            SirenixEditorGUI.EndHorizontalPropertyLayout();
        }
    }
}

